#ifndef GRAPHICSPANVIEW_H
#define GRAPHICSPANVIEW_H

#include <QGraphicsView>
#include <QGraphicsScene>
#include <QWidget>
#include <QMouseEvent>
#include <QCursor>
#include <QPointF>
#include <QScrollBar>

class GraphicsPanView : public QGraphicsView
{
    Q_OBJECT

public:
    GraphicsPanView(QGraphicsScene * scene, QWidget * parent = 0);

    void centerView();
    void setPanEnabled(bool enabled);
    QPointF getCenterPoint();
    
public slots:
    void screenMoved(QPointF newPosition);

signals:
    void screenPanned(QPointF newPosition);

protected:
    void timerEvent(QTimerEvent * event);
    void wheelEvent(QWheelEvent *event);

private:
    int timerID;

};

#endif // GRAPHICSPANVIEW_H
